<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>【案例】封装自己的数学对象</title>
    <script>
        var myMath = {
            PI:3.141592653589793,
            max:function (){
                var max = arguments[0];
                for(var i = 1;i < arguments.length;i++){
                    if(arguments[i] > max){
                        max = arguments[i];
                    }
                }
                return max;
            }
        };
        console.log(myMath.PI);
        console.log(myMath.max(10,20,30));
    </script>
</head>
<body>

</body>
</html>